package com.yhy.apiconsumer.controller;

import com.yhy.device.interfaces.IDeviceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * describe:
 *
 * @author helloworldyu
 * @date 2019/1/19
 */
@RestController
public class TestController {
	@Autowired
	private IDeviceService deviceService;


	@RequestMapping("/config")
	String testConfig(@RequestParam String config){
		return deviceService.setConfig(config);
	}


	@RequestMapping("/reboot")
	String testReboot(){
		return deviceService.reboot();
	}

}